<?php

use App\Http\Controllers\Admin\BannerController;
use App\Http\Controllers\Admin\KeywordsController;
use Illuminate\Support\Facades\Route;

Route::get('/welcome','AdminController@welcome');
Route::get('/','AdminController@index');
Route::get('/login','AdminController@login');
Route::get('/banners','BannersController@index');
Route::get('/banners/create','BannersController@create');
//store方法用于提交数据,有可能是添加,有可能是更新
Route::any('/banners/store','BannersController@store');

//关键字
Route::get('/keywords','KeywordsController@index');
Route::get('/keywords/create','KeywordsController@create');
//新增
Route::post('/keywords/store','KeywordsController@store');
//删除
Route::delete('/keywords/{id}','KeywordsController@destory');
//修改
Route::get('/keywords/{id}/edit','KeywordsController@edit');
//更新方法
Route::put('/keywords/{id}','KeywordsController@update');
/**
 * 标签
 */
Route::get('/tags','TagsController@index');

Route::get('/tags/create','TagsController@create');
//新增
Route::post('/tags/store','TagsController@store');
//删除
Route::delete('/tags/{id}','TagsController@destory');
//修改
Route::get('/tags/{id}/edit','TagsController@edit');
//更新方法
Route::put('/tags/{id}','TagsController@update');
//获取tags信息
Route::get('getTags','TagsController@getTags');

/**
 * 文章
 */

Route::get('/articles','ArticlesController@index');

Route::get('/articles/create','ArticlesController@create');
//新增
Route::post('/articles/store','ArticlesController@store');
//删除
Route::delete('/articles/{id}','ArticlesController@destory');
//修改
Route::get('/articles/{id}/edit','ArticlesController@edit');
//更新方法
Route::put('/articles/{id}','ArticlesController@update');

